/* ==========================================
   基础样式重置
========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  color: #333;
  background-color: #f5f5f7;
}

ul, ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* ==========================================
   颜色与变量定义
========================================== */
:root {
  --primary: #FB7299;    /* B站粉色 */
  --secondary: #23ADE5;  /* B站蓝色 */
  --dark: #18191C;
  --light: #F5F5F7;
  --gray: #999999;
  --gray-dark: #666666;
  --gray-light: #EEEEEE;
  --white: #FFFFFF;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

/* ==========================================
   工具类
========================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.flex {
  display: flex;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.p-4 {
  padding: 1rem;
}

.p-5 {
  padding: 1.25rem;
}

.text-center {
  text-align: center;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

.text-gray {
  color: var(--gray);
}

.text-gray-dark {
  color: var(--gray-dark);
}

.bg-white {
  background-color: var(--white);
}

.bg-gray-light {
  background-color: var(--gray-light);
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-full {
  border-radius: 9999px;
}

.shadow {
  box-shadow: var(--shadow);
}

.shadow-hover {
  box-shadow: var(--shadow-hover);
}

.overflow-hidden {
  overflow: hidden;
}

.object-cover {
  object-fit: cover;
}

.aspect-video {
  aspect-ratio: 16 / 9;
}

.aspect-square {
  aspect-ratio: 1 / 1;
}

.border {
  border: 1px solid var(--gray-light);
}

.border-t {
  border-top: 1px solid var(--gray-light);
}

.hidden {
  display: none !important;
}

/* ==========================================
   动画效果
========================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
  display: none;
}

/* ==========================================
   公共组件样式
========================================== */
/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: #f85a88;
}

.btn-secondary {
  background-color: var(--gray-light);
  color: var(--gray-dark);
}

.btn-secondary:hover {
  background-color: #e5e5e5;
}

/* 导航栏样式 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: var(--white);
  z-index: 100;
  transition: var(--transition);
}

.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.logo i {
  color: var(--primary);
  font-size: 1.5rem;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 500px;
  margin: 0 1rem;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: 9999px;
  background-color: var(--gray-light);
  transition: var(--transition);
}

.search-box input:focus {
  box-shadow: 0 0 0 2px rgba(251, 114, 153, 0.3);
}

.search-btn {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--gray);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-item {
  font-size: 1.25rem;
  color: var(--dark);
  transition: var(--transition);
}

.nav-item:hover {
  color: var(--primary);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  font-size: 1.25rem;
}

/* 页脚样式 */
.footer {
  background-color: var(--white);
  border-top: 1px solid var(--gray-light);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-logo i {
  color: var(--primary);
  font-size: 1.5rem;
}

.copyright {
  font-size: 0.875rem;
  color: var(--gray);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  font-size: 1.25rem;
  color: var(--gray);
  transition: var(--transition);
}

.social-link:hover {
  color: var(--primary);
}

/* ==========================================
   主页样式
========================================== */
main {
  padding-top: 56px; /* 导航栏高度 */
}

.cover-section {
  position: relative;
  height: 300px;
  overflow: hidden;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24, 25, 28, 0.8), transparent);
}

.user-info {
  position: relative;
  margin-top: -80px;
  padding-bottom: 20px;
}

.user-info-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.user-avatar {
  width: 160px;
  height: 160px;
  border-radius: 8px;
  object-fit: cover;
  border: 4px solid var(--white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-detail {
  color: var(--white);
  padding-top: 20px;
}

.user-name {
  font-size: 1.75rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.user-desc {
  margin-top: 0.5rem;
  max-width: 600px;
  opacity: 0.9;
}

.user-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.follow-btn {
  background-color: var(--primary);
  color: var(--white);
}

.message-btn {
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: var(--white);
}

.message-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.stats-nav {
  padding: 20px 0;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
}

.stat-name {
  font-size: 0.875rem;
  color: var(--gray);
}

.content-tabs {
  border-bottom: 1px solid var(--gray-light);
}

.tabs-list {
  display: flex;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.tabs-list::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 8px 16px;
  margin-right: 8px;
  white-space: nowrap;
  background: none;
  font-size: 0.9rem;
  color: var(--gray-dark);
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 500;
}

.content-area {
  padding: 20px 0 40px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 1.5rem;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title i {
  color: var(--primary);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
}

.info-item i {
  color: var(--gray);
  margin-top: 4px;
  width: 1.25rem;
}

.info-item p {
  margin-left: 0.75rem;
  color: var(--dark);
}

.info-item .link {
  margin-left: 0.75rem;
  color: var(--secondary);
}

.info-item .link:hover {
  text-decoration: underline;
}

.interest-tags {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-light);
}

.tags-title {
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-block;
  background-color: var(--gray-light);
  color: var(--gray-dark);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.announcement-content {
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.6;
}

.announcement-time {
  font-size: 0.8rem;
  color: var(--gray);
  margin-top: 0.75rem;
}

.filter-bar {
  margin-bottom: 1.5rem;
}

.filter-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.filter-btns {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 4px 12px;
  border-radius: 9999px;
  background-color: var(--gray-light);
  color: var(--gray-dark);
  font-size: 0.875rem;
  transition: var(--transition);
}

.filter-btn.active {
  background-color: var(--primary);
  color: var(--white);
}

.filter-select {
  position: relative;
}

.custom-select {
  padding: 4px 12px 4px 12px;
  padding-right: 2.5rem;
  border-radius: 9999px;
  background-color: var(--gray-light);
  color: var(--gray-dark);
  font-size: 0.875rem;
  appearance: none;
}

.filter-select i {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  pointer-events: none;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.content-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-media {
  position: relative;
  overflow: hidden;
}

.media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-card .card-media {
  aspect-ratio: 16/9;
}

.video-card:hover .media-img {
  transform: scale(1.05);
}

.video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--white);
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.video-card:hover .video-duration {
  background-color: rgba(251, 114, 153, 0.9);
}

.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .play-btn {
  opacity: 1;
}

.play-btn i {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 50%;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.video-card:hover .play-btn i {
  transform: scale(1);
}

.card-info {
  padding: 0.75rem;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
  height: 2.5rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--gray);
}

.article-card .card-info {
  padding: 1rem;
}

.article-type {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  color: var(--gray-dark);
  font-size: 0.875rem;
}

.article-type i {
  color: var(--secondary);
  font-size: 1.25rem;
}

.article-card .card-title {
  -webkit-line-clamp: 3;
  height: auto;
  margin-bottom: 0.75rem;
}

.photo-card .card-media {
  aspect-ratio: 1/1;
}

.photo-type {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--white);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
}

.photoset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  aspect-ratio: 1/1;
}

.photoset-more {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 50%;
  height: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
}

.load-more {
  margin-top: 2rem;
  text-align: center;
}

.load-btn {
  padding: 0.5rem 2rem;
  background: none;
  border: 1px solid var(--gray-light);
  color: var(--gray-dark);
  gap: 0.5rem;
}

.load-btn:hover {
  background-color: var(--gray-light);
}

/* ==========================================
   视频详情页样式
========================================== */
.video-page .container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 1.5rem;
  padding: 20px 15px;
}

.video-player {
  background-color: #000;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}

.player-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.video-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background-color: rgba(251, 114, 153, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.play-icon:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

.video-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1rem 0;
  line-height: 1.4;
}

.video-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 1rem;
}

.video-stats {
  display: flex;
  gap: 1.5rem;
  color: var(--gray);
  font-size: 0.9rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.video-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  background-color: var(--gray-light);
  color: var(--gray-dark);
  border-radius: 9999px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.action-btn:hover {
  background-color: #e5e5e5;
}

.author-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.author-detail {
  margin-left: 1rem;
  flex: 1;
}

.author-name {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.author-fans {
  font-size: 0.875rem;
  color: var(--gray);
}

.video-desc {
  margin-bottom: 1.5rem;
}

.desc-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--dark);
}

.desc-content {
  color: var(--gray-dark);
  line-height: 1.6;
}

.desc-content p {
  margin-bottom: 0.75rem;
}

.desc-content ul {
  margin-left: 1.5rem;
  list-style: disc;
  margin-bottom: 0.75rem;
}

.comment-section {
  margin-bottom: 2rem;
}

.comment-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.comment-input {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comment-input .user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.comment-input textarea {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  resize: none;
  height: 100px;
}

.send-comment {
  align-self: flex-end;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.comment-user {
  font-weight: 500;
}

.comment-time {
  font-size: 0.8rem;
  color: var(--gray);
}

.comment-text {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.comment-actions {
  display: flex;
  gap: 1rem;
}

.comment-actions .action-btn {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.load-more-comments {
  width: 100%;
  padding: 0.75rem;
  background: none;
  border: 1px solid var(--gray-light);
  color: var(--gray-dark);
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--gray-light);
}

.related-videos {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-video {
  display: flex;
  gap: 0.75rem;
}

.video-img {
  width: 120px;
  height: 80px;
  border-radius: 4px;
  object-fit: cover;
}

.video-info {
  flex: 1;
}

.video-info .video-title {
  font-size: 0.9rem;
  margin: 0 0 0.25rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.video-meta {
  font-size: 0.8rem;
  color: var(--gray);
  padding: 0;
  border: none;
  margin: 0;
}

/* ==========================================
   文章详情页样式
========================================== */
.article-page .container {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 1.5rem;
  padding: 20px 15px;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-light);
}

.article-content {
  background-color: var(--white);
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.article-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.article-content img {
  margin: 1.5rem auto;
  max-width: 100%;
  border-radius: 4px;
}

.article-content h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--dark);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--dark);
}

.article-content ul {
  margin: 0 0 1.5rem 1.5rem;
  list-style: disc;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-actions {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}

.article-actions .action-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ==========================================
   图片详情页样式
========================================== */
.photo-page .container {
  padding: 20px 15px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.photo-item {
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.photo-item:hover {
  transform: scale(1.03);
}

.photo-item img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.photo-detail {
  background-color: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.photo-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.photo-desc {
  color: var(--gray-dark);
  margin-bottom: 1rem;
}

.photo-meta {
  color: var(--gray);
  font-size: 0.9rem;
}

/* 图片查看器 */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-prev:hover, .lightbox-next:hover {
  background-color: rgba(251, 114, 153, 0.8);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* ==========================================
   响应式调整
========================================== */
@media (max-width: 1024px) {
  .main-content,
  .video-page .container,
  .article-page .container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: 1;
  }
  
  .content-main {
    order: 0;
  }
}

@media (max-width: 768px) {
  .cover-section {
    height: 200px;
  }
  
  .user-avatar {
    width: 120px;
    height: 120px;
  }
  
  .user-name {
    font-size: 1.5rem;
  }
  
  .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
  
  .video-title,
  .article-title {
    font-size: 1.25rem;
  }
  
  .video-meta,
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .search-box, .nav-item:not(.avatar-wrap) {
    display: none;
  }
  
  .photo-gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}